#ifndef SPINDLE_H_
#define SPINDLE_H_

#include "common.h"
#include "stdlib.h"

#define SPINDLE_GRAPH_INITIAL_LENGTH (1000)

struct spindle_data
{
  /* the origin point of spindle graph */
  mrr_byte_t *origin_of_graph;

  size_t length_of_graph;

  /* the latest point */
  mrr_byte_t *tail;

};

typedef struct spindle_data * spindle_t;

/* */
extern spindle_t
spindle_new();

/* */
extern size_t
spindle_occur(spindle_t spdl, int* elements, int size);

/* */
extern void
spindle_print(const spindle_t spdl);


#endif /* SPINDLE_H_ */
